package com.supply.dl.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.supply.dl.R;
import com.supply.dl.activity.seachmode.PickBillSureWareHouseModle;
import com.supply.dl.app.adapter.NormalAdapter;
import com.supply.dl.app.adapter.ViewHolder;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 领料定位详情页
 * <p>
 * Author:  tian <br/>
 * Time:  2018/5/3 23:53
 */
public class TakeMaterialLocationActivity extends BaseActivity {

    @BindView(R.id.material_rc)
    RecyclerView material_rc;

    private NormalAdapter<String> adapter;

    private List<String> datas;

    @Override
    protected int getLayoutResource() {
        return R.layout.activity_take_material_location;
    }

    @Override
    protected void initView() {
        showLeftBack();
        setTitleShow("创建领料单");

        datas = new ArrayList<>();
        datas.add("1");
        datas.add("2");

        adapter = new NormalAdapter<String>(this, datas) {
            @Override
            protected void convert(ViewHolder holder, String data) {

            }

            @Override
            protected int getItemLayoutId() {
                return R.layout.item_material_sheet;
            }
        };

//        material_rc.addItemDecoration(new RecyclerViewDivider(this, LinearLayoutManager.VERTICAL));
        material_rc.setLayoutManager(new LinearLayoutManager(this));
        material_rc.setAdapter(adapter);
    }


    @OnClick(R.id.store_tv)
    public void OnClick(View v) {
        switch (v.getId()) {

            case R.id.store_tv:
                Bundle bundle = new Bundle();
                bundle.putString("modleName", PickBillSureWareHouseModle.class.getName());
                jumpActivity(SearchActivity.class, bundle);
                break;
        }
    }

}
